package memento;

import pojo.User;

import java.util.ArrayList;
import java.util.List;

// 备忘录管理员
public class CareTaker {

    private List<User> mementoList = new ArrayList<User>();

    public void add(User state) {
        mementoList.add(state);
    }

    public User get(int index){
        return mementoList.get(index);
    }

    public List<User> getMementoList() {
        return mementoList;
    }
}
